<script setup>
import { ref } from "vue";
const img = ref([
  { url: 'https://fastly.jsdelivr.net/npm/@vant/assets/leaf.jpeg' },
]);
const name = ref('')
const onSubmit = (values) => {
  console.log('submit', values);
};

</script>

<template>
  <van-form @submit="onSubmit" required="auto">
    <van-cell-group inset>
      <van-field name="uploader" label="修改头像">
        <template #input>
          <van-uploader v-model="img" max-count="1" />
        </template>
      </van-field>
      <van-field v-model="name" label="修改昵称" placeholder="请修改的昵称" />
    </van-cell-group>
    <div style="margin: 16px;">
      <van-button round block type="primary" native-type="submit">
        提交
      </van-button>
    </div>
  </van-form>
</template>

<style scoped>
/* Add any desired styles here */
</style>